//
//  ToastView.h
//  EPTool
//
//  Created by guoshiqing on 2018/4/25.
//  Copyright © 2018年 云数动能科技. All rights reserved.
//

#import <UIKit/UIKit.h>

//消失(关闭)后动作
typedef void(^ToastDismissBlock)(void);

@interface ToastView : UIView
@property (nonatomic, strong) NSString *promptMsg;
@property (nonatomic, assign) NSTimeInterval duration;
@property (nonatomic, copy) ToastDismissBlock block;

/**
 *  显示自动消失提示框，默认维持2秒，默认没Blok,默认显示在window上
 */
+ (void)showMsg:(NSString *)msg;

/**
 *  显示自动消失提示框，默认维持2秒，默认没Blok
 */
+ (void)showMsg:(NSString *)msg inView:(UIView *)view;

/**
 *  显示自动消失提示框，维持duration秒，默认没Blok
 */
+ (void)showMsg:(NSString *)msg inView:(UIView *)view withDuration:(NSTimeInterval)duration;

/**
 *  显示自动消失提示框，默认维持2秒
 */
+ (void)showMsg:(NSString *)msg inView:(UIView *)view dismissBlock:(ToastDismissBlock)block;

/**
 *  显示自动消失提示框，维持duration秒
 */
+ (void)showMsg:(NSString *)msg inView:(UIView *)view withDuration:(NSTimeInterval)duration dismissBlock:(ToastDismissBlock)block;

@end
